﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="MaterialApproveForm.aspx.cs" Inherits="App_Input_MaterialApproveForm"
    Title="物资设备审批" %>

<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript" type="text/javascript">
        function openPersonSrh(){
            var url  = "../Commons/EmployeeSearchForm.aspx";
	        var prm  = "?CONTROL_ID=" + "<%= txtAuditing.ClientID %>";
	        prm += "&CONTROL_NAME=" + "<%= txtAuditingPerName.ClientID %>";
	        url += prm;	        
	        var win = window.open(url,'MaterialApproveForm','scrollbars,resizable,height=460,width=500');
	        win.focus();	        	        
        }
            
    </script>

    <div>
        <asp:MultiView ID="MultiView1" runat="server">
            <!-- 检索 -->
            <asp:View ID="View1" runat="server">
                <table class="table_border_line">
                    <tr>
                        <td align="left" colspan="4" style="height: 17px">

                            <script language="javascript" type="text/javascript">
                                (new TitleBar('RegisterBar', '审批清单')).showBar();
                            </script>

                        </td>
                    </tr>
                </table>
                <table width="100%">
                    <tr>
                        <td style="width: 20%"></td>
                        <td width="30%"></td>
                        <td width="40%"></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td style="width: 20%"></td>
                        <td width="30%">&nbsp;申领部门：
                            <asp:DropDownList ID="lstDept" runat="server" Width="80px">
                            </asp:DropDownList>
                        </td>
                        <td width="40%">&nbsp;审批状态：
                            <asp:DropDownList ID="lstStat" runat="server" Height="22px" Width="80px">
                            </asp:DropDownList>
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td style=""></td>
                        <td colspan="2">&nbsp;日期范围：
                            <asp:TextBox ID="txtStartDate" runat="server" Width="80px" MaxLength="10" onfocus="new Calendar(1900,2015,0,null).show(this);"></asp:TextBox>&nbsp;
                            ~ &nbsp;
                            <asp:TextBox ID="txtEndDate" runat="server" MaxLength="10" Width="80px" onfocus="new Calendar(1900,2015,0,null).show(this);"></asp:TextBox></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td style=""></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td colspan="4" style="text-align: center">
                            <asp:Button ID="btnSearch" runat="server" Text=" 检 索 " Width="89px" CssClass="button"
                                OnClick="btnSearch_Click" /></td>
                    </tr>
                    <tr>
                        <td colspan="4" style="text-align: center"></td>
                    </tr>
                    <tr>
                        <td style="" colspan="4">
                            <asp:GridView ID="gridViewRequisition" runat="server" CssClass="GridView_table" AutoGenerateColumns="False"
                                AllowPaging="True" DataKeyNames="RequisitiobnId" EnableViewState="False" OnPageIndexChanging="gridViewRequisition_PageIndexChanging"
                                OnRowCommand="gridViewRequisition_RowCommand">
                                <Columns>
                                    <asp:BoundField DataField="RequisitiobnId" HeaderText="申领编号">
                                        <ItemStyle CssClass="GridView_item_center" Width="10%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="申领部门" DataField="RequisitionDeptmentName">
                                        <ItemStyle CssClass="GridView_item_left" Width="10%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="申领人" DataField="RequisitionPersonName">
                                        <ItemStyle CssClass="GridView_item_left" Width="10%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="申领日期" DataField="RequisitionDate" DataFormatString="{0:yyyy/MM/dd}"
                                        HtmlEncode="False">
                                        <ItemStyle CssClass="GridView_item_center" Width="15%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="审批状态" DataField="AuditingTypeName">
                                        <ItemStyle CssClass="GridView_item_center" Width="10%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="审批人" DataField="AuditingPersonName">
                                        <ItemStyle CssClass="GridView_item_center" Width="10%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="审批日期" DataField="AuditingDate" DataFormatString="{0:yyyy/MM/dd}"
                                        HtmlEncode="False">
                                        <ItemStyle CssClass="GridView_item_center" Width="10%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:ButtonField ButtonType="Image" CommandName="Details" HeaderText="审批" ImageUrl="~/images/info.gif"
                                        Text="审批">
                                        <ItemStyle CssClass="GridView_item_center" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" Width="5%" />
                                    </asp:ButtonField>
                                </Columns>
                                <PagerStyle HorizontalAlign="Right" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </asp:View>
            <!-- 审批登记 -->
            <asp:View ID="View2" runat="server">
                <table class="table_border_line">
                    <tr>
                        <td align="left" colspan="4" style="height: 17px">

                            <script language="javascript">
                                (new TitleBar('RegisterBar', '申领单')).showBar();
                            </script>

                        </td>
                    </tr>
                </table>
                <table width="100%">
                    <tr>
                        <td style="width: 10%"></td>
                        <td style="width: 40%">&nbsp;<asp:Label ID="lblReqId" runat="server" Visible="False"></asp:Label></td>
                        <td style="width: 40%"></td>
                        <td style="width: 10%"></td>
                    </tr>
                    <tr>
                        <td style="width: 10%;">&nbsp; </td>
                        <td style="width: 40%;">&nbsp;申领部门：
                            <asp:Label ID="lblReqDept" runat="server"></asp:Label>
                        </td>
                        <td style="width: 40%;">&nbsp;申领人员：
                            <asp:Label ID="lblReqPerson" runat="server"></asp:Label></td>
                        <td style=""></td>
                    </tr>
                    <tr>
                        <td style="">&nbsp; </td>
                        <td style="">&nbsp;审批状态：
                            <asp:Label ID="lblReqStat" runat="server"></asp:Label></td>
                        <td style="">&nbsp;审批人员：
                            <asp:Label ID="lblReqAuditing" runat="server"></asp:Label></td>
                        <td style=""></td>
                    </tr>
                    <tr>
                        <td style="">&nbsp; </td>
                        <td style="">&nbsp;申领原因： </td>
                        <td style="">&nbsp;申领日期：
                            <asp:Label ID="lblReqDate" runat="server"></asp:Label></td>
                        <td style=""></td>
                    </tr>
                    <tr>
                        <td style="">&nbsp; </td>
                        <td colspan="2">&nbsp;<asp:TextBox ID="lblReqReason" runat="server" Rows="3" TextMode="MultiLine"
                            Width="99%" ReadOnly="True"></asp:TextBox></td>
                        <td style=""></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td colspan="2">&nbsp;申领物资：</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td style="">&nbsp; </td>
                        <td colspan="2">
                            <asp:GridView ID="gridViewDetail" runat="server" CssClass="GridView_table" AutoGenerateColumns="False">
                                <Columns>
                                    <asp:BoundField HeaderText="类别" DataField="CatalogName">
                                        <ItemStyle CssClass="GridView_item_center" Width="25%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="名称" DataField="MaterialName">
                                        <ItemStyle CssClass="GridView_item_left" Width="40%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="数量" DataField="Quantity">
                                        <ItemStyle CssClass="GridView_item_right" Width="10%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="单价" DataField="Price" DataFormatString="{0:N}" HtmlEncode="false" Visible="false">
                                        <ItemStyle CssClass="GridView_item_right" Width="10%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="合计" DataField="Amount" Visible="false">
                                        <ItemStyle CssClass="GridView_item_right" Width="15%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                </Columns>
                            </asp:GridView>
                        </td>
                        <td></td>
                    </tr>
                </table>
                <table class="table_border_line">
                    <tr>
                        <td colspan="3" align="left" style="">

                            <script language="javascript" type="text/javascript">
                                (new TitleBar('RegisterBar', '转批历史')).showBar();
                            </script>

                        </td>
                    </tr>
                    <tr>
                        <td style="width: 10%"></td>
                        <td style="width: 80%">
                            <asp:GridView ID="gridViewHistory" runat="server" CssClass="GridView_table" AutoGenerateColumns="False"
                                OnRowDataBound="gridViewHistory_RowDataBound">
                                <Columns>
                                    <asp:BoundField HeaderText="审批状态" DataField="AuditingTypeName">
                                        <ItemStyle CssClass="GridView_item_center" Width="10%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="审批日期" DataField="AuditingDate" DataFormatString="{0:yyyy/MM/dd}"
                                        HtmlEncode="false">
                                        <ItemStyle CssClass="GridView_item_center" Width="15%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="审批人" DataField="AuditingPersonName">
                                        <ItemStyle CssClass="GridView_item_left" Width="15%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="所属部门" DataField="RequisitionDeptmentName">
                                        <ItemStyle CssClass="GridView_item_left" Width="15%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                    <asp:BoundField HeaderText="原因" DataField="Memo">
                                        <ItemStyle CssClass="GridView_item_left" Width="45%" />
                                        <HeaderStyle CssClass="GridView_head_grayblue" />
                                    </asp:BoundField>
                                </Columns>
                            </asp:GridView>
                        </td>
                        <td style="width: 10%"></td>
                    </tr>
                </table>
                <table class="table_border_line">
                    <tr>
                        <td align="left" style="">

                            <script language="javascript" type="text/javascript">
                                (new TitleBar('RegisterBar', '审批')).showBar();
                            </script>

                        </td>
                    </tr>
                </table>
                <table width="100%">
                    <tr>
                        <td style="width: 10%" height="25"></td>
                        
                        <td align="left" style="width: 80%">&nbsp;转批人：<asp:TextBox ID="txtAuditing" runat="server"
                            Width="67px" MaxLength="4"></asp:TextBox>&nbsp;<asp:TextBox
                                ID="txtAuditingPerName" runat="server" Width="71px" BackColor="#E0E0E0" BorderColor="#E0E0E0" ForeColor="Black"   contentEditable ="false"></asp:TextBox>
                            <a href="#" onclick="javascript:openPersonSrh();">
                                <img id="searchImg" runat="server" src="../../images/search.jpg" border="0" />
                            </a></td>
                        <td align="left" style="width: 10%"></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td align="left" style="width: 423px;">&nbsp;原 因：</td>
                        <td align="left" style="width: 423px"></td>
                    </tr>
                    <tr>
                        <td style=""></td>
                        <td align="center" style="">&nbsp;<asp:TextBox ID="txtMemo" runat="server" Rows="3"
                            TextMode="MultiLine" Width="99%"></asp:TextBox>&nbsp;</td>
                        <td align="center"></td>
                    </tr>
                    <tr>
                        <td style="width: 52px"></td>
                        <td align="center"></td>
                        <td align="center"></td>
                    </tr>
                    <tr>
                        <td align="center" style="text-align: center" valign="bottom" colspan="3">
                            <asp:Button ID="btnPass" runat="server" Text="通 过" Width="81px" CssClass="button"
                                OnClick="btnPass_Click" />&nbsp;
                            <asp:Button ID="btnReject" runat="server" CssClass="button" Text="拒 绝" Width="81px"
                                OnClick="btnReject_Click" />&nbsp;
                            <asp:Button ID="btnWait" runat="server" Text="转 批" Width="81px" CssClass="button"
                                OnClick="btnWait_Click" />&nbsp;
                            <asp:Button ID="btnBack" runat="server" Text="返 回" Width="88px" OnClick="btnBack_Click"
                                CssClass="button" /></td>
                    </tr>
                </table>
            </asp:View>
        </asp:MultiView>
    </div>
</asp:Content>
